﻿namespace Digitalmes.Common.Security;

/// <summary>
/// 身份授权特性。
/// </summary>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
public sealed class AuthorizeAttribute(params string[] roles) : Attribute
{
    /// <summary>
    /// 获取用户可访问资源的角色集合。
    /// </summary>
    public string[] Roles => roles ?? [];
}
